package com.example.demo.controller;


import com.example.demo.pojo.User;
import com.example.demo.service.HelloWorldService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/Demo")
public class HelloWorldTest {
    @Autowired
    HelloWorldService helloWorldService;

    @RequestMapping(value = "/helloWorld", method = RequestMethod.GET)
    public List<User> Test() throws Exception {
        return helloWorldService.query();
    }
}
